//////////////////////////////////////////////////////////////////////////////////
//	 Copyright 2011 by Yosef Grabivker, ryuho@homenetworksoft.com
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.
//////////////////////////////////////////////////////////////////////////////////

#ifndef _NOTIFY_OPTIONS_YG_H__
#define _NOTIFY_OPTIONS_YG_H__

#include "def.h"

class CNotifyOptions: public wxPanel
{
public:
								CNotifyOptions(wxWindow* pParent);
	virtual						~CNotifyOptions(void);

	//SMTP Server
	wxString					GetSMTPServer();
	void						SetSMTPServer(const wxString& str);

	//SMTP Server Port
	unsigned short				GetSMTPServerPort();
	void						SetSMTPServerPort(unsigned short wPort);

	//SMTP User
	wxString					GetSMTPUser();
	void						SetSMTPUser(const wxString& str);

	//SMTP Passw
	wxString					GetSMTPPassw();
	void						SetSMTPPassw(const wxString& str);

	//SMTP From
	wxString					GetSMTPFrom();
	void						SetSMTPFrom(const wxString& str);

	//SMTP To
	wxString					GetSMTPTo();
	void						SetSMTPTo(const wxString& str);

	//Send application Log
	bool						GetSendAppLog();
	void						SetSendAppLog(bool bVal=true);

	//Send syslog Log
	bool						GetSendSysLog();
	void						SetSendSysLog(bool bVal=true);

	//Send interval
	time_t						GetSendPeriod();
	void						SetSendPeriod(time_t t);

	//Syslog email send level
	long						GetSyslogSendLevel();
	void						SetSyslogSendLevel(long lLevel);


protected:
	void						OnTimeIntChanged(wxCommandEvent&);
	void						OnTextFieldsUpdated(wxCommandEvent& ev);
	DECLARE_EVENT_TABLE()


private:
	class wxTextCtrl*			m_ptcSMTPSrv;
	class wxTextCtrl*			m_ptcSMTPSrvPort;
	wxString					m_strSMTPPort;

	class wxTextCtrl*			m_ptcSMTPUser;
	class wxTextCtrl*			m_ptcSMTPPassw;

	class wxTextCtrl*			m_ptcSMTPFrom;
	class wxTextCtrl*			m_ptcSMTPTo;

	class wxCheckBox*			m_pSendAppLog;
	class wxCheckBox*			m_pSendSysLog;
	class wxComboBox*			m_pcSendTime;
	time_t						m_tInt;

	class wxComboBox*			m_pSyslogLevel;
};

#endif //_NOTIFY_OPTIONS_YG_H__